package com.anywhere.ms.base.auth.model;

import com.anywhere.ms.base.enmu.TokenStatus;
import com.anywhere.ms.base.jpa.IdBaseModel;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Table(name = "access_token")
@Entity
public class AccessTokenModel extends IdBaseModel {
    @Column(name = "token", length = 64, nullable = false, updatable = false)
    private String token;
    @Column(name = "member_Id", length = 64, nullable = false)
    private String memberId;
    @Column(name = "status", length = 20, nullable = false)
    private TokenStatus status;
    @Column(name = "time_created", nullable = false)
    private Date timeCreated;
    @Column(name = "time_expired", nullable = false)
    private Date timeExpired;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public TokenStatus getStatus() {
        return status;
    }

    public void setStatus(TokenStatus status) {
        this.status = status;
    }

    public Date getTimeCreated() {
        return timeCreated;
    }

    public void setTimeCreated(Date timeCreated) {
        this.timeCreated = timeCreated;
    }

    public Date getTimeExpired() {
        return timeExpired;
    }

    public void setTimeExpired(Date timeExpired) {
        this.timeExpired = timeExpired;
    }
}
